import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import*
testCase17='DBshop017_添加属性组流程'
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,'商品管理','商品属性','属性分组')#进入属性分组
firefox.find_element_by_partial_link_text('添加属性组').click() #点击添加属性组
firefox.find_element_by_id('attribute_group_name').send_keys('好好学习') #属性名名称填入
firefox.find_element_by_id('attribute_group_sort').clear()
firefox.find_element_by_id('attribute_group_sort').send_keys('1')#属性组排序改为1
firefox.find_element_by_xpath('//button').click() # 保存属性组信息
time.sleep(2)

try:
    firefox.find_element_by_xpath('//input[@value="1"]')
    writeLog("%s 测试通过" % testCase17)
except:
    writeLog("%s 测试不通过" % testCase17)
    getPhoto(firefox)
firefox.quit()